package com.hitrust.gs.bean;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.hitrust.gs.service.GSBaseBean;

import framework.core.Value;
/**
 * GSProductStorageApepBean 2009-03-19
 */
public class GSProductApepBean implements GSBaseBean{

	private String id;
	private String status;
	private String is_buy;
	private String balance_mode;
	private String provider_code;
	private String concentricity_code;
	private String name;
	private String product_brand;
	private String model;
	private String spec;
	private String quality_assure_period;
	private String manufaturer;
	private String area;
	private String adapt_machine_type;
	private String product_unit;
	private double unit_price;
	private String apep_code;
	private String drawing_piece_code;



	/**
	 * @return the apep_code
	 */
	public String getApep_code() {
		return apep_code;
	}
	/**
	 * @param aApep_code the apep_code to set
	 */
	public void setApep_code(String aApep_code) {
		apep_code = aApep_code;
	}
	/**
	 * @return the product_unit
	 */
	public String getProduct_unit() {
		return product_unit;
	}
	/**
	 * @param aProduct_unit the product_unit to set
	 */
	public void setProduct_unit(String aProduct_unit) {
		product_unit = aProduct_unit;
	}

	/**
	 * @return the product_brand
	 */
	public String getProduct_brand(){
		return product_brand;
	}
	/**
	 * @param aProduct_brand the product_brand to set
	 */
	public void setProduct_brand(String aProduct_brand){
		product_brand = aProduct_brand;
	}

	/**
	 * @return the provider_code
	 */
	public String getProvider_code(){
		return provider_code;
	}
	/**
	 * @param aProvider_code the provider_code to set
	 */
	public void setProvider_code(String aProvider_code){
		provider_code = aProvider_code;
	}
	/**
	 * @return the concentricity_code
	 */
	public String getConcentricity_code(){
		return concentricity_code;
	}
	/**
	 * @param aConcentricity_code the concentricity_code to set
	 */
	public void setConcentricity_code(String aConcentricity_code){
		concentricity_code = aConcentricity_code;
	}

	/**
	 * @return the balance_mode
	 */
	public String getBalance_mode(){
		return balance_mode;
	}
	/**
	 * @param aBalance_mode the balance_mode to set
	 */
	public void setBalance_mode(String aBalance_mode){
		balance_mode = aBalance_mode;
	}


	/**
	 * @return the name
	 */
	public String getName(){
		return name;
	}
	/**
	 * @param aName the name to set
	 */
	public void setName(String aName){
		name = aName;
	}
	/**
	 * @return the quality_assure_period
	 */
	public String getQuality_assure_period(){
		return quality_assure_period;
	}
	/**
	 * @param aQuality_assure_period the quality_assure_period to set
	 */
	public void setQuality_assure_period(String aQuality_assure_period){
		quality_assure_period = aQuality_assure_period;
	}

	/**
	 * @return the spec
	 */
	public String getSpec(){
		return spec;
	}
	/**
	 * @param aSpec the spec to set
	 */
	public void setSpec(String aSpec){
		spec = aSpec;
	}
	/**
	 * @return the product_id
	 */
	public String getId(){
		return id;
	}
	/**
	 * @param aProduct_id the product_id to set
	 */
	public void setId(String aId){
		id = aId;
	}

	/**
	 * @return the adapt_machine_type
	 */
	public String getAdapt_machine_type(){
		return adapt_machine_type;
	}
	/**
	 * @param aAdapt_machine_type the adapt_machine_type to set
	 */
	public void setAdapt_machine_type(String aAdapt_machine_type){
		adapt_machine_type = aAdapt_machine_type;
	}

	/**
	 * @return the status
	 */
	public String getStatus(){
		return status;
	}
	/**
	 * @param aStatus the status to set
	 */
	public void setStatus(String aStatus){
		status = aStatus;
	}
	/**
	 * @return the is_sync
	 */
	public String getIs_buy(){
		return is_buy;
	}
	/**
	 * @param aIs_sync the is_sync to set
	 */
	public void setIs_sync(String aIs_buy){
		is_buy = aIs_buy;
	}
	/**
	 * @return the manufaturer
	 */
	public String getManufaturer(){
		return manufaturer;
	}
	/**
	 * @param aManufaturer the manufaturer to set
	 */
	public void setManufaturer(String aManufaturer){
		manufaturer = aManufaturer;
	}
	/**
	 * @return the model
	 */
	public String getModel(){
		return model;
	}
	/**
	 * @param aModel the model to set
	 */
	public void setModel(String aModel){
		model = aModel;
	}
	/**
	 * @return the product_count
	 */
	public double getUnit_price(){
		return unit_price;
	}
	/**
	 * @param aProduct_count the product_count to set
	 */
	public void setProduct_count(double aUnit_price){
		unit_price = aUnit_price;
	}
	/**
	 * @return the area
	 */
	public String getArea(){
		return area;
	}
	/**
	 * @param aArea the area to set
	 */
	public void setArea(String aArea){
		area = aArea;
	}


	public String getDrawingPieceCode() {
		return drawing_piece_code;
	}
	public void setDrawingPieceCode(String drawing_piece_code) {
		drawing_piece_code = drawing_piece_code;
	}

	public Object process(ResultSet aResultSet) throws SQLException {
		GSProductApepBean tGSProductApepBean=new GSProductApepBean();
		tGSProductApepBean.product_brand = aResultSet.getString("product_brand")==null?"":aResultSet.getString("product_brand").trim();
		tGSProductApepBean.provider_code = aResultSet.getString("provider_code")==null?"":aResultSet.getString("provider_code").trim();
		tGSProductApepBean.concentricity_code = aResultSet.getString("concentricity_code")==null?"":aResultSet.getString("concentricity_code").trim();
		tGSProductApepBean.balance_mode = aResultSet.getString("balance_mode")==null?"":aResultSet.getString("balance_mode").trim();
		tGSProductApepBean.name = aResultSet.getString("name")==null?"":aResultSet.getString("name").trim();
		tGSProductApepBean.quality_assure_period = aResultSet.getString("quality_assure_period")==null?"":aResultSet.getString("quality_assure_period").trim();
		tGSProductApepBean.spec = aResultSet.getString("spec")==null?"":aResultSet.getString("spec").trim();
		tGSProductApepBean.id = aResultSet.getString("id")==null?"":aResultSet.getString("id").trim();
		tGSProductApepBean.adapt_machine_type = aResultSet.getString("adapt_machine_type")==null?"":aResultSet.getString("adapt_machine_type").trim();
		tGSProductApepBean.status = aResultSet.getString("status")==null?"":aResultSet.getString("status").trim();
		tGSProductApepBean.is_buy = aResultSet.getString("is_buy")==null?"":aResultSet.getString("is_buy").trim();
		tGSProductApepBean.manufaturer = aResultSet.getString("manufaturer")==null?"":aResultSet.getString("manufaturer").trim();
		tGSProductApepBean.model = aResultSet.getString("model")==null?"":aResultSet.getString("model").trim();
		tGSProductApepBean.unit_price = aResultSet.getDouble("unit_price")== Value.NULL_DOUBLE ? 0:aResultSet.getDouble("unit_price");
		tGSProductApepBean.area = aResultSet.getString("area")==null?"":aResultSet.getString("area").trim();
		tGSProductApepBean.product_unit=aResultSet.getString("product_unit")==null?"":aResultSet.getString("product_unit");
		tGSProductApepBean.apep_code=aResultSet.getString("apep_code")==null?"":aResultSet.getString("apep_code");
		try {
			tGSProductApepBean.drawing_piece_code = aResultSet.getString("drawing_piece_code") == null ? "" : aResultSet.getString("drawing_piece_code");
		} catch(Exception e) {
			tGSProductApepBean.drawing_piece_code = "";
		}
		return tGSProductApepBean;
	}
}